package com.atguigu.crowd.mapper;


import com.atguigu.crowd.entity.po.ProjectPO;
import com.atguigu.crowd.entity.po.ProjectPOExample;
import com.atguigu.crowd.entity.vo.DetailProjectVO;
import com.atguigu.crowd.entity.vo.PortalProjectVO;
import com.atguigu.crowd.entity.vo.PortalTypeVO;
import com.atguigu.crowd.entity.vo.ProjectVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface ProjectPOMapper {
    int countByExample(ProjectPOExample example);

    int deleteByExample(ProjectPOExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ProjectPO record);

    int insertSelective(ProjectPO record);

    List<ProjectPO> selectByExample(ProjectPOExample example);

    ProjectPO selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByExample(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByPrimaryKeySelective(ProjectPO record);

    int updateByPrimaryKey(ProjectPO record);

    void insertTypeRelationship(@Param("typeIdList") List<Integer> typeIdList, @Param("projectId") Integer projectId);

    void insertTagRelationship(@Param("tagIdList") List<Integer> tagIdList, @Param("projectId") Integer projectId);

    //查询分类VO信息包含其中的项目VO信息 拿到的也是PortalTypeVO集合 所有分类
    List<PortalTypeVO> selectPortalTypeVOList();

    //根据项目ID查询出项目详细信息  其中包括回报信息列表  详情图片列表
    DetailProjectVO selectDetailProjectVO(Integer projectId);

    //根据用户ID 获取其发起的项目
    List<DetailProjectVO> selectMemberDetailProjectVO(Integer memberId);


    //获取项目开发周期
    Integer selectProjectDevelopmentDay(Integer projectId);

    //申请延期 修改字段
    int updateProjectDelay(@Param("projectId")Integer projectId,@Param("delayDay")Integer delayDay,@Param("delayNumber")Integer delayNumber
    ,@Param("developmentDay")Integer developmentDay);

    List<PortalProjectVO> selectPortalProjectVOListAll();

    List<PortalProjectVO> selectPortalProjectVOListOther(Integer typeId);



}